home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / program / cprog.EXE / DRIVES2.C < prev    next >
C/C++ Source or Header  |  1996-06-26  |  1KB  |  44 lines

  1. #include <stdio.h>
  2. #include "drivesex.h"
  3.  
  4. main()
  5. {
  6.     int i;
  7.  
  8.     Drives_Exist();
  9.     for (i = 0; i < 26; i++)
  10.     {
  11.         if (drives[i<<2] == DRIVEXISTS)
  12.         {
  13.             printf("%c: ",i+65);
  14.             printf("%s ",drives[(i<<2)+1] == 0 ? "Removable" : "Fixed    ");
  15.  
  16.             switch (drives[(i<<2)+2])
  17.             {
  18.                 case LOCALDRV :printf("Local  ");
  19.                                break;
  20.                 case REMOTEDRV:printf("Remote ");
  21.                                break;
  22.                 case SHAREDRV :printf("Shared ");
  23.                                break;
  24.             }
  25.  
  26.             switch (drives[(i<<2)+3])
  27.             {
  28.                 case FLOPPY:printf("Floppy");
  29.                             break;
  30.                 case HARD  :printf("Hard");
  31.                             break;
  32.                 case RAM   :printf("RAM");
  33.                             break;
  34.                 case SUBST :printf("Subst");
  35.                             break;
  36.                 case CDROM :printf("CD-ROM");
  37.                             break;
  38.             }
  39.  
  40.             printf("\n");
  41.         }
  42.     }
  43. }
  44.